function changePage(command) {
	var _form = document.forms[0];
	if (!_form) {
		alert("无效Form对象");
		return;
	}
	if (!_form.elements["currentPageNum"]) {
		alert("必须设置分页信息currentPageNum属性");
		return;
	} else if (!_form.elements["totalPageCount"]) {
		alert("必须设置分页信息totalPageCount属性");
		return;
	} else if (!_form.elements["pageNum"]) {
		alert("必须设置分页信息pageNum属性");
		return;
	}
	//if(validator && !validator()){
		//return ;
	//}
	var currentPageNum = _form.elements["currentPageNum"];
	var totalPageCount = _form.elements["totalPageCount"];
	if (command == "first") {
		if (currentPageNum.value == '1') {
			return;
		}
		currentPageNum.value = '1';
	} else if (command == "last") {
		if (parseInt(currentPageNum.value)== parseInt(totalPageCount.value)) {
			return;
		}
		currentPageNum.value = parseInt(totalPageCount.value);
	} else if (command == "next") {
		if (parseInt(currentPageNum.value) + 1 > parseInt(totalPageCount.value)) {
			return;
		}
		currentPageNum.value = parseInt(currentPageNum.value)+1;
	} else if (command == "previous") {
		if (parseInt(currentPageNum.value) <= 1) {
			return;
		}
		currentPageNum.value = parseInt(currentPageNum.value) - 1;
	} else {
		var pageNum = _form.elements["pageNum"];
		var reg = /^\d+$/;
		if (reg.test(pageNum.value)) {
			if (parseInt(pageNum.value) == parseInt(currentPageNum.value)) {
				return;
			}
			if (parseInt(pageNum.value) > parseInt(totalPageCount.value)
					|| parseInt(pageNum.value) < 1) {
				pageNum.value = parseInt(currentPageNum.value);
				return;
			}
			currentPageNum.value = parseInt(pageNum.value);
		} else {
			pageNum.value = parseInt(currentPageNum.value);
			return ;
		}
	}
	var newPageNum = document.createElement("input");
	newPageNum.setAttribute("type", "hidden");
	newPageNum.setAttribute("name", "pageUtil.curPage");
	newPageNum.setAttribute("value",currentPageNum.value);
	_form.appendChild(newPageNum);			
	_form.submit();	
}

